from django.contrib import admin
# Register your models here.
import models

class UsersetAdmin(admin.ModelAdmin):
    list_display=("name",'email','shenfen','zhuanye')
    search_fields=('name','email')
    list_filter=('zhuanye',)
admin.site.register(models.Userset,UsersetAdmin)

class QuestingsetAdmin(admin.ModelAdmin):
    list_display=("id",'content','answerid','uptime')
    search_fields=('content','answerid')
    list_filter=('content',)
admin.site.register(models.Questingset,QuestingsetAdmin)


class KaiyuanshipinAdmin(admin.ModelAdmin):
    list_display=("id",'name','imageurl',)
    search_fields=('name','id')
    list_filter=('name',)
admin.site.register(models.Kaiyuanshipin,KaiyuanshipinAdmin)

class HuifusetAdmin(admin.ModelAdmin):
    list_display=("id",'content','userid','questringid')
    search_fields=('content','id')
    list_filter=('userid',)
admin.site.register(models.Huifuset,HuifusetAdmin)

class FilemangsetAdmin(admin.ModelAdmin):
    list_display=("id",'filename','fileleibie','fileleibiename')
    search_fields=('filename','fileleibiename')
    list_filter=('fileleibie',)
admin.site.register(models.Filemangset,FilemangsetAdmin)

class AnswersetAdmin(admin.ModelAdmin):
    list_display=("id",'title','userid','creattime')
    search_fields=('title','content')
    list_filter=('userid',)
admin.site.register(models.Answerset,AnswersetAdmin)

class VideosetAdmin(admin.ModelAdmin):
    list_display=("id",'name','fenlei')
    search_fields=('name','fenlei')
    list_filter=('fenlei',)
admin.site.register(models.Videoset,VideosetAdmin)

class VideoshowsetAdmin(admin.ModelAdmin):
    list_display=("id",'name','videoid','videosize')
    search_fields=('name','videoname')
    list_filter=('videoid',)
admin.site.register(models.Videoshowset,VideoshowsetAdmin)

class VideojilusetAdmin(admin.ModelAdmin):
    list_display=("userid",'videoshouid','crettime')
    search_fields=('userid','videoshouid')
    list_filter=('userid',)
admin.site.register(models.Videojiluset,VideojilusetAdmin)